Integrand size = 16, antiderivative size = 93 \[ \int (c+d x) (a+a \sec (e+f x)) \, dx=\frac {a (c+d x)^2}{2 d}-\frac {2 i a (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {i a d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i a d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2} \]
1/2*a*(d*x+c)^2/d-2*I*a*(d*x+c)*arctan(exp(I*(f*x+e)))/f+I*a*d*polylog(2,- I*exp(I*(f*x+e)))/f^2-I*a*d*polylog(2,I*exp(I*(f*x+e)))/f^2
Time = 0.06 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.94 \[ \int (c+d x) (a+a \sec (e+f x)) \, dx=\frac {a \left (f \left (f x (2 c+d x)-4 i (c+d x) \arctan \left (e^{i (e+f x)}\right )\right )+2 i d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )-2 i d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )\right )}{2 f^2} \]
(a*(f*(f*x*(2*c + d*x) - (4*I)*(c + d*x)*ArcTan[E^(I*(e + f*x))]) + (2*I)* d*PolyLog[2, (-I)*E^(I*(e + f*x))] - (2*I)*d*PolyLog[2, I*E^(I*(e + f*x))] ))/(2*f^2)
Time = 0.26 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3042, 4678, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x) (a \sec (e+f x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )dx\) |
\(\Big \downarrow \) 4678 |
\(\displaystyle \int (a (c+d x) \sec (e+f x)+a (c+d x))dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 i a (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {a (c+d x)^2}{2 d}+\frac {i a d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i a d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}\) |
(a*(c + d*x)^2)/(2*d) - ((2*I)*a*(c + d*x)*ArcTan[E^(I*(e + f*x))])/f + (I *a*d*PolyLog[2, (-I)*E^(I*(e + f*x))])/f^2 - (I*a*d*PolyLog[2, I*E^(I*(e + f*x))])/f^2
3.1.3.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Time = 0.39 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.53
method | result | size |
parts | \(a \left (\frac {1}{2} d \,x^{2}+x c \right )+\frac {a \left (\frac {d \left (-\left (f x +e \right ) \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )+\left (f x +e \right ) \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )\right )}{f}+c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )-\frac {e d \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\right )}{f}\) | \(142\) |
derivativedivides | \(\frac {a c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )-\frac {a d e \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {a d \left (-\left (f x +e \right ) \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )+\left (f x +e \right ) \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )\right )}{f}+a c \left (f x +e \right )-\frac {a d e \left (f x +e \right )}{f}+\frac {a d \left (f x +e \right )^{2}}{2 f}}{f}\) | \(166\) |
default | \(\frac {a c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )-\frac {a d e \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {a d \left (-\left (f x +e \right ) \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )+\left (f x +e \right ) \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )\right )}{f}+a c \left (f x +e \right )-\frac {a d e \left (f x +e \right )}{f}+\frac {a d \left (f x +e \right )^{2}}{2 f}}{f}\) | \(166\) |
risch | \(\frac {a d \,x^{2}}{2}+a x c -\frac {2 i a c \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}-\frac {a d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}-\frac {a d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {a d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}+\frac {a d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {i a d \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {i a d \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {2 i a d e \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}\) | \(186\) |
a*(1/2*d*x^2+x*c)+a/f*(1/f*d*(-(f*x+e)*ln(1+I*exp(I*(f*x+e)))+(f*x+e)*ln(1 -I*exp(I*(f*x+e)))+I*dilog(1+I*exp(I*(f*x+e)))-I*dilog(1-I*exp(I*(f*x+e))) )+c*ln(sec(f*x+e)+tan(f*x+e))-e/f*d*ln(sec(f*x+e)+tan(f*x+e)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 343 vs. \(2 (73) = 146\).
Time = 0.33 (sec) , antiderivative size = 343, normalized size of antiderivative = 3.69 \[ \int (c+d x) (a+a \sec (e+f x)) \, dx=\frac {a d f^{2} x^{2} + 2 \, a c f^{2} x - i \, a d {\rm Li}_2\left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) - i \, a d {\rm Li}_2\left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) + i \, a d {\rm Li}_2\left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) + i \, a d {\rm Li}_2\left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) - {\left (a d e - a c f\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) + {\left (a d e - a c f\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right ) + {\left (a d f x + a d e\right )} \log \left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) - {\left (a d f x + a d e\right )} \log \left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) + {\left (a d f x + a d e\right )} \log \left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) - {\left (a d f x + a d e\right )} \log \left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) - {\left (a d e - a c f\right )} \log \left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) + {\left (a d e - a c f\right )} \log \left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right )}{2 \, f^{2}} \]
1/2*(a*d*f^2*x^2 + 2*a*c*f^2*x - I*a*d*dilog(I*cos(f*x + e) + sin(f*x + e) ) - I*a*d*dilog(I*cos(f*x + e) - sin(f*x + e)) + I*a*d*dilog(-I*cos(f*x + e) + sin(f*x + e)) + I*a*d*dilog(-I*cos(f*x + e) - sin(f*x + e)) - (a*d*e - a*c*f)*log(cos(f*x + e) + I*sin(f*x + e) + I) + (a*d*e - a*c*f)*log(cos( f*x + e) - I*sin(f*x + e) + I) + (a*d*f*x + a*d*e)*log(I*cos(f*x + e) + si n(f*x + e) + 1) - (a*d*f*x + a*d*e)*log(I*cos(f*x + e) - sin(f*x + e) + 1) + (a*d*f*x + a*d*e)*log(-I*cos(f*x + e) + sin(f*x + e) + 1) - (a*d*f*x + a*d*e)*log(-I*cos(f*x + e) - sin(f*x + e) + 1) - (a*d*e - a*c*f)*log(-cos( f*x + e) + I*sin(f*x + e) + I) + (a*d*e - a*c*f)*log(-cos(f*x + e) - I*sin (f*x + e) + I))/f^2
\[ \int (c+d x) (a+a \sec (e+f x)) \, dx=a \left (\int c\, dx + \int c \sec {\left (e + f x \right )}\, dx + \int d x\, dx + \int d x \sec {\left (e + f x \right )}\, dx\right ) \]
a*(Integral(c, x) + Integral(c*sec(e + f*x), x) + Integral(d*x, x) + Integ ral(d*x*sec(e + f*x), x))
\[ \int (c+d x) (a+a \sec (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (a \sec \left (f x + e\right ) + a\right )} \,d x } \]
1/2*(a*d*f*x^2 + 2*a*c*f*x + 4*a*d*f*integrate((x*cos(2*f*x + 2*e)*cos(f*x + e) + x*sin(2*f*x + 2*e)*sin(f*x + e) + x*cos(f*x + e))/(cos(2*f*x + 2*e )^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1), x) + a*c*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*sin(f*x + e) + 1) - a*c*log(cos(f*x + e)^2 + si n(f*x + e)^2 - 2*sin(f*x + e) + 1))/f
\[ \int (c+d x) (a+a \sec (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (a \sec \left (f x + e\right ) + a\right )} \,d x } \]
Timed out. \[ \int (c+d x) (a+a \sec (e+f x)) \, dx=\int \left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )\,\left (c+d\,x\right ) \,d x \]